﻿#ifndef LOADING_H
#define LOADING_H

#include <QWidget>
#include <QTimer>

class Loading : public QWidget
{
    Q_OBJECT
public:
    explicit Loading(QWidget* parent = nullptr, const QString& text = "Loading...");

public slots:
    void start();
    void stop();

protected:
    void paintEvent(QPaintEvent*) override;
    void resizeEvent(QResizeEvent* event) override;
    bool eventFilter(QObject *watched, QEvent *event) override;

private:
    QWidget* m_centerWidget;
    QString m_text;
};

#endif // LOADING_H
